#ifndef __AT24CXX_H
#define __AT24CXX_H

#include "ch32v30x.h"

void IIC_Init(u32 bound, u16 address);
void IIC_DMA_RX_Init(uint8_t *pBuffer, uint16_t len);
void IIC_DMA_TX_Init(uint8_t *pBuffer, uint16_t len);
uint8_t AT24CXX_Read(uint8_t memAddress, uint8_t *pBuffer, uint16_t size);
uint8_t AT24CXX_Write(uint8_t memAddress, uint8_t *pBuffer, uint16_t size);
uint8_t AT24CXX_Write_CrossPage(uint16_t memAddress, uint8_t *pBuffer, uint16_t size);
void AT24CXX_Init(void);

#endif // __AT24CXX_H
